package han.Chensing.CCirnosLibrary.util;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class RegexUtil {
    public static String getFirstMatch(String string, Pattern pattern,int fit){
        Matcher matcher = pattern.matcher(string);
        if(!matcher.find())
            return null;
        String group = matcher.group();
        return group.substring(fit,group.length()-fit);
    }
}
